//
//  ImageCollectionLayoutCalculator.h
//  WeChatMoments
//
//  Created by Jiang on 2019/8/26.
//  Copyright © 2019 SilverFruity. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ImageCollectionLayoutCalculator : NSObject
@property(nonatomic, assign) NSInteger itemCount;
@property(nonatomic, assign) CGFloat  cellMargin;
@property(nonatomic, assign) CGFloat  singleItemViewMaxWidth;
@property(nonatomic, assign) CGFloat  fourItemViewMaxWidth;
@property(nonatomic, assign) CGFloat nineItemViewMaxWidth;

- (instancetype)initWithItemCount:(NSInteger)itemCount cellMargin:(CGFloat)cellMargin singleItemViewMaxWidth:(CGFloat)singleItemViewMaxWidth fourItemViewMaxWidth:(CGFloat)fourItemViewMaxWidth nineItemViewMaxWidth:(CGFloat)nineItemViewMaxWidth;

+ (instancetype)calculatorWithItemCount:(NSInteger)itemCount cellMargin:(CGFloat)cellMargin singleItemViewMaxWidth:(CGFloat)singleItemViewMaxWidth fourItemViewMaxWidth:(CGFloat)fourItemViewMaxWidth nineItemViewMaxWidth:(CGFloat)nineItemViewMaxWidth;
- (CGFloat)viewWidth;
- (CGSize)itemSize;
- (CGFloat)viewHeight;
- (NSInteger)columnCount;
- (NSInteger)rowCount;
@end

NS_ASSUME_NONNULL_END
